Skip to content

feat(roles-permissions): add id-based management methods and role_ids search#1456

Merged
yosiharan merged 9 commits intomainfrom
feat/role-permission-by-id
May 4, 2026
Merged

feat(roles-permissions): add id-based management methods and role_ids search#1456
yosiharan merged 9 commits intomainfrom
feat/role-permission-by-id

Conversation

@yosiharan
Copy link
Copy Markdown
Contributor

@yosiharan yosiharan commented May 3, 2026

Related Issues

Required for:
https://github.com/descope/etc/issues/15352

Related PRs

Upstream PRs

Downstream PRs

Description

Adds explicit _by_id methods alongside existing ones for Roles and Permissions CRUD, keeping the API clean, simple and fully backwards compatible.

Permission — new methods:

  • update_by_id(id, new_name, description)
  • delete_by_id(id)
  • delete_batch_by_ids(ids)

Role — new methods:

  • update_by_id(id, new_name, description, permission_names, tenant_id, default, private)
  • delete_by_id(id, tenant_id)
  • delete_batch_by_ids(role_ids, tenant_id)
  • search(..., role_ids) — new optional filter param (additive, backward compatible)

Must

  • Tests

…earch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 3, 2026 13:07
@shuni-bot-dev
Copy link
Copy Markdown

shuni-bot-dev Bot commented May 3, 2026

🐕 Review complete — View session on Shuni Portal 🐾

shuni-bot-dev[bot]

This comment was marked as outdated.

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Coverage report

The coverage rate went from 98.36% to 98.37% ⬆️

100% of new lines are covered.

Diff Coverage details (click to unfold)

descope/management/permission.py

100% of new lines are covered (100% of the complete file).

descope/management/role.py

100% of new lines are covered (97.77% of the complete file).

yosiharan and others added 2 commits May 3, 2026 16:27
…ord id arg; add ids to delete_batch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d/role_ids kwargs only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yosiharan yosiharan changed the title feat(roles-permissions): add UpdateWithID/DeleteWithID and role_ids search feat(roles-permissions): add id-based update/delete and role_ids search/delete_batch May 3, 2026
…s; zero breaking changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yosiharan yosiharan changed the title feat(roles-permissions): add id-based update/delete and role_ids search/delete_batch feat(roles-permissions): add id-based management methods and role_ids search May 3, 2026
@yosiharan yosiharan enabled auto-merge (squash) May 3, 2026 17:14
@yosiharan yosiharan requested a review from dorsha May 3, 2026 17:27
@yosiharan yosiharan merged commit 3d3b0ac into main May 4, 2026
24 of 30 checks passed
@yosiharan yosiharan deleted the feat/role-permission-by-id branch May 4, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants